import Vue from 'vue'
import Router from 'vue-router'
/* Layout-公用组件 */
import Layout from 'views/layout'
import TopNav from 'common/components/nav/topNav.vue'
import LeftNav from 'common/components/nav/leftNav.vue'
// 首页
import businessHome from 'views/business/businessHome'
// 业务模块
import Dict from 'views/business/dict'
import Account from 'views/business/account' // 用户管理AccountDetail
import AccountDetail from 'views/business/accountDetail' // 用户管理详情
import UpdataUser from 'views/business/account/components/updataUser' // 添加/编辑用户
import Menu from 'views/business/menuTree'
import Auth from 'views/business/auth'
import RoleTable from 'views/business/roleTable'
import RoleAdmin from 'views/business/roleAdmin'
import RoleApi from 'views/business/roleApi'
import RoleView from 'views/business/roleView'
import ScheduleJob from 'views/business/scheduleJob'
import ChildView from 'common/components/ChildView' // 三级路由视图层
import Notice from 'views/business/notice' // 系统公告
import exportManage from 'views/business/exportManage' // 导出管理
import importManage from 'views/business/importManage' // 导入管理
import withinMsg from 'views/business/withinMsg' // 系统消息
import planDetails from 'views/business/planDetails' // 借款详情
import receiveManage from 'views/business/receiveManage' // 还款管理
import borrowManage from 'views/business/borrowManage' // 借款管理
import invoiceManage from 'views/business/invoiceManage' // 发票管理
import projectDetails from 'views/business/projectDetails' // 主体概况
import itemDetails from 'views/business/itemDetails' // 项目概况
import companyList from 'views/business/companyList' // 主体列表
import createCompany from 'views/business/createCompany' // 创建主体
import createBranch from 'views/business/createBranch' // 创建主体 分公司
import createSubject from 'views/business/createSubject' // 创建主体 总公司
import createPersonal from 'views/business/createPersonal' // 创建主体 个人
import bondsman from 'views/business/bondsman' // 担保人
import projectList from 'views/business/projectList' // 项目列表
import createProject from 'views/business/createProject' // 创建项目
import LinkmanTable from 'views/business/linkmanTable' // 联系人列表
import LinkmanDetail from 'views/business/linkmanDetail' // 联系人详情
import AdminMoudle from 'views/business/adminMoudle' // 模块管理
import AdminFlow from 'views/business/adminFlow' // 审批流程
import msgManage from 'views/business/msgManage' // 消息管理
import BaseSetting from 'views/business/baseSetting' // 平台基本设置
import Certificate from 'views/business/certificate' // 证书管理
import Qualification from 'views/business/qualification' // 资质管理
import Seal from 'views/business/seal' // 印章管理
import CertificatePack from 'views/business/certificatePack' // 证书包管理
import OtherSetting from 'views/business/otherSetting' // 第三方配置
import PatrolSetting from 'views/business/patrolSetting' // 巡检模板管理
import createInspectionList from 'views/business/createInspectionList' // 创建巡检单
import editInspection from 'views/business/editInspection' // 编辑巡检
import InspectionDetails from 'views/business/InspectionDetails' // 巡检详情
import AddLinkMan from 'views/business/addLinkMan' // 添加联系人
import issueDetails from 'views/business/issueDetails' // 期次详情
import periodTask from 'views/business/periodTask' // 周期任务
import businessList from 'views/business/businessList' // 全部业务
import companyStatistics from 'views/business/companyStatistics' // 主体统计
import projectStatistics from 'views/business/projectStatistics' // 项目统计
import businessDetails from 'views/business/businessDetails' // 业务详情
import statisticalDetails from 'views/business/statisticalDetails' // 统计详情
// import projectFilter from 'views/business/projectFilter' // 项目筛选
// import subjectFilter from 'views/business/subjectFilter' // 主体筛选
import linkmanStatistics from 'views/business/linkmanStatistics' // 联系人数据分析
import businessStatistics from 'views/business/businessStatistics' // 业务数据统计
import taskRecordStatistics from 'views/business/taskRecordStatistics' // 任务记录汇总
import followUpRecordStatistics from 'views/business/followUpRecordStatistics' // 跟进记录汇总
import deviceController from 'views/business/deviceController' // 设备管理
import follow from 'views/business/follow' // 跟进记录
import subjectEditInspection from 'views/business/subjectEditInspection' // 主体巡检编辑
import subjectCreateInspection from 'views/business/subjectCreateInspection' // 主体创建巡检
import subjectInspectionDetails from 'views/business/subjectInspectionDetails' // 主体巡检详情
import addProAccount from 'views/business/addProAccount' // 添加主体联系人

Vue.use(Router)

/**
 * @param {businessRouter}
 * 业务模块路由
 */

export const businessRouter = [
  // 首页
  {
    path: '/businessCenter',
    type: 'businessCenter',
    name: 'businessCenter',
    title: '业务系统',
    component: Layout,
    redirect: '/configView',
    menuShow: true,
    iconCls: 'icon-caidan',
    children: [
      {
        path: '/configView',
        components: {
          content: ChildView,
          top: TopNav,
          aside: LeftNav
        }
      },
      {
        path: '/menuHome',
        type: 'menuHome',
        name: 'menuHome',
        title: '菜单',
        components: {
          content: ChildView,
          top: TopNav,
          aside: LeftNav
        },
        menuShow: true,
        iconCls: 'icon-caidan',
        redirect: '/businessEntrance',
        children: [
          {
            path: '/businessEntrance',
            name: '快捷菜单',
            components: {
              content: ChildView,
              top: TopNav,
              aside: LeftNav
            },
            menuShow: true,
            iconCls: 'icon-caidan',
            redirect: '/businessHome',
            children: [
              {
                path: '/businessHome',
                name: '业务系统首页',
                components: {
                  content: businessHome,
                  top: TopNav,
                  aside: LeftNav
                },
                menuShow: true,
                meta: { title: '业务系统首页' }
              },
              {
                path: 'companyTable/list',
                name: '主体列表',
                menuShow: true,
                meta: { title: '主体列表' }
              },
              {
                path: 'companyTable/list/filter',
                name: '主体筛选',
                menuShow: true,
                meta: { title: '主体筛选' }
              },
              {
                path: 'project/list',
                name: '项目列表',
                menuShow: true,
                meta: { title: '项目列表' }
              },
              {
                path: 'project/list/filter',
                name: '项目筛选',
                menuShow: true,
                meta: { title: '项目筛选' }
              },
              {
                path: 'notice/list',
                name: '系统公告',
                menuShow: true,
                meta: { title: '系统公告' }
              },
              {
                path: 'follow',
                name: '跟进记录',
                menuShow: true,
                meta: { title: '跟进记录' }
              },
              {
                path: 'withinmsg',
                name: '系统消息',
                menuShow: true,
                meta: { title: '系统消息' }
              }
            ]
          }
        ]
      },
      // 主体
      {
        path: '/company',
        type: 'company',
        name: 'company',
        title: '主体',
        components: {
          content: ChildView,
          top: TopNav,
          aside: LeftNav
        },
        redirect: '/configView',
        menuShow: true,
        iconCls: 'icon-zhediexiaoguo',
        children: [
          {
            path: '/configView',
            components: {
              content: ChildView,
              top: TopNav,
              aside: LeftNav
            }
          }, {
            path: '/companyTable',
            name: '主体管理',
            components: {
              content: ChildView,
              top: TopNav,
              aside: LeftNav
            },
            redirect: '/companyTable/list',
            menuShow: true,
            iconCls: 'icon-zhediexiaoguo',
            meta: { title: '主体管理' },
            children: [{
              path: '/companyTable/list',
              name: '主体列表',
              components: {
                content: companyList,
                top: TopNav,
                aside: LeftNav
              },
              menuShow: true,
              meta: { title: '主体列表' }
            },
            {
              path: '/companyTable/list/projectdetails',
              name: '主体概况',
              unAuthPage: {
                checkAllOperation: true,
                parentPath: '/companyTable/list'
              },
              components: {
                content: projectDetails,
                top: TopNav,
                aside: LeftNav
              },
              // leaf: false,
              menuShow: false,
              // iconCls: 'icon-zhediexiaoguo',
              meta: { title: '主体概况' }
            },
            {
              path: '/companyTable/list/addlinkMan',
              name: '添加主体联系人',
              components: {
                content: addProAccount,
                top: TopNav,
                aside: LeftNav
              },
              // leaf: false,
              menuShow: false,
              // iconCls: 'icon-zhediexiaoguo',
              meta: { title: '添加主体联系人' }
            },
            // {
            //   path: '/companyTable/list/filter',
            //   name: '主体筛选',
            //   unAuthPage: {
            //     checkAllOperation: true,
            //     parentPath: '/companyTable/list'
            //   },
            //   components: {
            //     content: subjectFilter,
            //     top: TopNav,
            //     aside: LeftNav
            //   },
            //   // leaf: false,
            //   menuShow: false,
            //   meta: { title: '主体筛选' }
            // },
            {
              path: '/companyTable/list/subjectcreateinspection',
              name: '创建巡检单',
              components: {
                content: subjectCreateInspection,
                top: TopNav,
                aside: LeftNav
              },
              // leaf: false,
              menuShow: false,
              meta: { title: '创建巡检单' }
            },
            {
              path: '/companyTable/list/subjecteditinspection',
              name: '编辑巡检单',
              components: {
                content: subjectEditInspection,
                top: TopNav,
                aside: LeftNav
              },
              // leaf: false,
              menuShow: false,
              meta: { title: '编辑巡检单' }
            },
            {
              path: '/companyTable/list/subjectinspectiondetails',
              name: '巡检详情',
              components: {
                content: subjectInspectionDetails,
                top: TopNav,
                aside: LeftNav
              },
              // leaf: false,
              menuShow: false,
              meta: { title: '巡检详情' }
            },

            {
              path: '/createcompany',
              name: '创建主体',
              components: {
                content: createCompany,
                top: TopNav,
                aside: LeftNav
              },
              leaf: true,
              menuShow: true,
              iconCls: 'icon-zhediexiaoguo',
              meta: { title: '创建主体' }
            },
            {
              path: '/createcompany/createbranch',
              name: '创建分公司',
              components: {
                content: createBranch,
                top: TopNav,
                aside: LeftNav
              },
              leaf: true,
              menuShow: false,
              iconCls: 'icon-zhediexiaoguo',
              meta: { title: '创建分公司' }
            },
            {
              path: '/createcompany/createpersonal',
              name: '创建个人',
              components: {
                content: createPersonal,
                top: TopNav,
                aside: LeftNav
              },
              leaf: true,
              menuShow: false,
              iconCls: 'icon-zhediexiaoguo',
              meta: { title: '创建个人' }
            },
            {
              path: '/createcompany/createsubject',
              name: '创建总公司',
              components: {
                content: createSubject,
                top: TopNav,
                aside: LeftNav
              },
              leaf: true,
              menuShow: false,
              iconCls: 'icon-zhediexiaoguo',
              meta: { title: '创建总公司' }
            },
            {
              path: '/createcompany/bondsman',
              name: '新建担保人',
              components: {
                content: bondsman,
                top: TopNav,
                aside: LeftNav
              },
              leaf: true,
              menuShow: false,
              iconCls: 'icon-zhediexiaoguo',
              meta: { title: '新建担保人' }
            }]
          }
        ]
      },
      // 项目
      {
        path: '/project',
        type: 'project',
        name: 'project',
        title: '项目',
        components: {
          content: ChildView,
          top: TopNav,
          aside: LeftNav
        },
        redirect: '/configView',
        menuShow: true,
        iconCls: 'icon-zhediexiaoguo',
        children: [
          {
            path: '/configView',
            components: {
              content: ChildView,
              top: TopNav,
              aside: LeftNav
            }
          }, {
            path: '/projectTable',
            name: '项目管理',
            components: {
              content: ChildView,
              top: TopNav,
              aside: LeftNav
            },
            redirect: '/project/list',
            menuShow: true,
            iconCls: 'icon-zhediexiaoguo',
            meta: { title: '项目管理' },
            children: [
              {
                path: '/project/list',
                name: '项目列表',
                components: {
                  content: projectList,
                  top: TopNav,
                  aside: LeftNav
                },
                menuShow: true,
                meta: { title: '项目列表' }
              },
              {
                path: '/project/list/itemdetails',
                name: '项目概况',
                unAuthPage: {
                  checkAllOperation: true,
                  parentPath: '/project/list'
                },
                components: {
                  content: itemDetails,
                  top: TopNav,
                  aside: LeftNav
                },
                menuShow: false,
                meta: { title: '项目概况' }
              },
              {
                path: '/project/list/addlinkMan',
                name: '添加联系人',
                components: {
                  content: addProAccount,
                  top: TopNav,
                  aside: LeftNav
                },
                menuShow: false,
                meta: { title: '添加联系人' }
              },
              // {
              //   path: '/project/list/filter',
              //   name: '项目筛选',
              //   unAuthPage: {
              //     checkAllOperation: true,
              //     parentPath: '/project/list'
              //   },
              //   components: {
              //     content: projectFilter,
              //     top: TopNav,
              //     aside: LeftNav
              //   },
              //   menuShow: false,
              //   meta: { title: '项目筛选' }
              // },
              {
                path: '/project/list/createinspectionlist',
                name: '创建巡检单',
                components: {
                  content: createInspectionList,
                  top: TopNav,
                  aside: LeftNav
                },
                menuShow: false,
                meta: { title: '创建巡检单' }
              },
              {
                path: '/project/list/editinspection',
                name: '编辑巡检单',
                components: {
                  content: editInspection,
                  top: TopNav,
                  aside: LeftNav
                },
                menuShow: false,
                meta: { title: '编辑巡检单' }
              },
              {
                path: '/project/list/InspectionDetails',
                name: '巡检详情',
                components: {
                  content: InspectionDetails,
                  top: TopNav,
                  aside: LeftNav
                },
                menuShow: false,
                meta: { title: '巡检详情' }
              },
              {
                path: '/createproject',
                name: '创建项目',
                components: {
                  content: createProject,
                  top: TopNav,
                  aside: LeftNav
                },
                leaf: true,
                menuShow: true,
                meta: { title: '创建项目' }
              }
            ]
          }
        ]
      },
      // 业务
      {
        path: '/business',
        type: 'business',
        name: 'business',
        title: '业务',
        components: {
          content: ChildView,
          top: TopNav,
          aside: LeftNav
        },
        redirect: '/configView',
        menuShow: true,
        iconCls: 'icon-zhediexiaoguo',
        children: [
          {
            path: '/configView',
            components: {
              content: ChildView,
              top: TopNav,
              aside: LeftNav
            }
          }, {
            path: '/businessSetting',
            name: '业务管理',
            components: {
              content: ChildView,
              top: TopNav,
              aside: LeftNav
            },
            redirect: '/businessTable',
            menuShow: true,
            iconCls: 'icon-zhediexiaoguo',
            meta: { title: '业务管理' },
            children: [
              {
                path: '/businessTable',
                name: '全部业务',
                components: {
                  content: businessList,
                  top: TopNav,
                  aside: LeftNav
                },
                menuShow: true,
                meta: { title: '全部业务' }
              },
              {
                path: '/businessTable/details',
                name: '业务详情',
                unAuthPage: {
                  checkAllOperation: true,
                  parentPath: '/businessTable'
                },
                components: {
                  content: businessDetails,
                  top: TopNav,
                  aside: LeftNav
                },
                menuShow: false,
                meta: { title: '业务详情' }
              }
            ]
          }
        ]
      },
      // 联系人
      {
        path: '/linkman',
        type: 'linkman',
        name: 'linkman',
        title: '联系人',
        components: {
          content: ChildView,
          top: TopNav,
          aside: LeftNav
        },
        redirect: '/configView',
        menuShow: true,
        iconCls: 'icon-zhediexiaoguo',
        children: [
          {
            path: '/configView',
            components: {
              content: ChildView,
              top: TopNav,
              aside: LeftNav
            }
          }, {
            path: '/linkmanTableSetting',
            name: '联系人管理',
            components: {
              content: ChildView,
              top: TopNav,
              aside: LeftNav
            },
            // leaf: fa,
            menuShow: true,
            iconCls: 'icon-zhediexiaoguo',
            meta: { title: '联系人管理' },
            redirect: '/linkmanTable',
            children: [
              {
                path: '/linkmanTable',
                name: '联系人列表',
                components: {
                  content: LinkmanTable,
                  top: TopNav,
                  aside: LeftNav
                },
                // leaf: true,
                menuShow: true
              },
              {
                path: '/linkmanTable/linkmanDetail',
                name: '联系人详情',
                unAuthPage: {
                  checkAllOperation: true,
                  parentPath: '/linkmanTable'
                },
                components: {
                  content: LinkmanDetail,
                  top: TopNav,
                  aside: LeftNav
                },
                // leaf: true,
                menuShow: false,
                meta: { title: '联系人详情' }
              }, {
                path: '/addlinkman/add',
                name: '添加联系人',
                components: {
                  content: AddLinkMan,
                  top: TopNav,
                  aside: LeftNav
                },
                // leaf: true,
                menuShow: true,
                iconCls: 'icon-zhediexiaoguo',
                meta: { title: '添加联系人' }
              }
              // {
              //   path: '/linkmanTable/addprolinkman/add',
              //   name: '添加联系人',
              //   components: {
              //     content: addProAccount,
              //     top: TopNav,
              //     aside: LeftNav
              //   },
              //   // leaf: false,
              //   menuShow: false,
              //   iconCls: 'icon-zhediexiaoguo',
              //   meta: { title: '添加联系人' }
              // }
            ]
          }]
      },
      // 财务
      {
        path: '/finance',
        type: 'finance',
        name: 'finance',
        title: '财务',
        components: {
          content: ChildView,
          top: TopNav,
          aside: LeftNav
        },
        redirect: '/configView',
        menuShow: true,
        iconCls: 'icon-zhediexiaoguo',
        children: [
          {
            path: '/configView',
            components: {
              content: ChildView,
              top: TopNav,
              aside: LeftNav
            }
          }, {
            path: '/borrowmanageTable',
            name: '财务管理',
            components: {
              content: ChildView,
              top: TopNav,
              aside: LeftNav
            },
            redirect: '/borrowmanage/list',
            // leaf: true,
            menuShow: true,
            iconCls: 'icon-zhediexiaoguo',
            meta: { title: '财务管理' },
            children: [{
              path: '/borrowmanage/list',
              name: '借款管理',
              components: {
                content: borrowManage,
                top: TopNav,
                aside: LeftNav
              },
              // leaf: false,
              menuShow: true,
              meta: { title: '借款管理' }
            },
            {
              path: '/borrowmanage/list/plandetails',
              name: '借款详情',
              unAuthPage: {
                checkAllOperation: true,
                parentPath: '/borrowmanage/list'
              },
              components: {
                content: planDetails,
                top: TopNav,
                aside: LeftNav
              },
              // leaf: false,
              menuShow: false,
              meta: { title: '借款详情' }
            },
            {
              path: '/borrowmanage/list/issuedetails',
              name: '期次详情',
              unAuthPage: {
                checkAllOperation: true,
                parentPath: '/borrowmanage/list'
              },
              components: {
                content: issueDetails,
                top: TopNav,
                aside: LeftNav
              },
              // leaf: false,
              menuShow: false,
              meta: { title: '期次详情' }
            },
            {
              path: '/receivemanage',
              name: '还款管理',
              components: {
                content: receiveManage,
                top: TopNav,
                aside: LeftNav
              },
              leaf: true,
              menuShow: true,
              // iconCls: 'icon-zhediexiaoguo',
              meta: { title: '还款管理' }
            },
            {
              path: '/invoicemanage',
              name: '发票管理',
              components: {
                content: invoiceManage,
                top: TopNav,
                aside: LeftNav
              },
              leaf: true,
              menuShow: true,
              // iconCls: 'icon-zhediexiaoguo',
              meta: { title: '发票管理' }
            }
            ]
          }
        ]
      },
      // 审批
      // {
      //   path: '/approval',
      //   type: 'approval',
      //   name: 'approval',
      //   title: '审批',
      //   components: {
      //     content: ChildView,
      //     top: TopNav,
      //     aside: LeftNav
      //   },
      //   redirect: '/configView',
      //   menuShow: true,
      //   iconCls: 'icon-zhediexiaoguo',
      //   children: [
      //     {
      //       path: '/configView',
      //       components: {
      //         content: ChildView,
      //         top: TopNav,
      //         aside: LeftNav
      //       }
      //     }, {
      //       path: '/approvaltable',
      //       name: '审批管理',
      //       components: {
      //         content: ChildView,
      //         top: TopNav,
      //         aside: LeftNav
      //       },
      //       redirect: '/awaitApproval',
      //       // leaf: true,
      //       menuShow: true,
      //       iconCls: 'icon-zhediexiaoguo',
      //       meta: { title: '审批管理' },
      //       children: [
      //         {
      //           path: '/awaitApproval',
      //           name: '待审批',
      //           components: {
      //             content: awaitApproval,
      //             top: TopNav,
      //             aside: LeftNav
      //           },
      //           // leaf: false,
      //           menuShow: true,
      //           meta: { title: '待审批' }
      //         },
      //         {
      //           path: '/confirmSucceed',
      //           name: '审批记录',
      //           components: {
      //             content: confirmSucceed,
      //             top: TopNav,
      //             aside: LeftNav
      //           },
      //           // leaf: false,
      //           menuShow: true,
      //           meta: { title: '审批记录' }
      //         },
      //         {
      //           path: '/businessApproval',
      //           name: '业务审批',
      //           components: {
      //             content: businessApproval,
      //             top: TopNav,
      //             aside: LeftNav
      //           },
      //           // leaf: false,
      //           menuShow: true,
      //           meta: { title: '业务审批' }
      //         },
      //         {
      //           path: '/requestmoneyapproval',
      //           name: '请款审批',
      //           components: {
      //             content: requestMoneyApproval,
      //             top: TopNav,
      //             aside: LeftNav
      //           },
      //           // leaf: false,
      //           menuShow: false,
      //           meta: { title: '请款审批' }
      //         },
      //         {
      //           path: '/purchasingapproval',
      //           name: '采购审批',
      //           components: {
      //             content: purchasingApproval,
      //             top: TopNav,
      //             aside: LeftNav
      //           },
      //           // leaf: false,
      //           menuShow: false,
      //           meta: { title: '采购审批' }
      //         },
      //         {
      //           path: '/repaymentapproval',
      //           name: '还款审批',
      //           components: {
      //             content: repaymentApproval,
      //             top: TopNav,
      //             aside: LeftNav
      //           },
      //           // leaf: false,
      //           menuShow: false,
      //           meta: { title: '还款审批' }
      //         },
      //         {
      //           path: '/taskapproval',
      //           name: '任务审批',
      //           components: {
      //             content: taskApproval,
      //             top: TopNav,
      //             aside: LeftNav
      //           },
      //           // leaf: false,
      //           menuShow: false,
      //           meta: { title: '任务审批' }
      //         },
      //         {
      //           path: '/contractapprove',
      //           name: '合同审批',
      //           components: {
      //             content: contractApprove,
      //             top: TopNav,
      //             aside: LeftNav
      //           },
      //           // leaf: false,
      //           menuShow: false,
      //           meta: { title: '合同审批' }
      //         },
      //         {
      //           path: '/projectapprove',
      //           name: '项目审批',
      //           components: {
      //             content: projectApprove,
      //             top: TopNav,
      //             aside: LeftNav
      //           },
      //           // leaf: false,
      //           menuShow: false,
      //           meta: { title: '项目审批' }
      //         },
      //         {
      //           path: '/companyapprove',
      //           name: '主体审批',
      //           components: {
      //             content: companyApprove,
      //             top: TopNav,
      //             aside: LeftNav
      //           },
      //           // leaf: false,
      //           menuShow: false,
      //           meta: { title: '主体审批' }
      //         }
      //       ]
      //     }
      //   ]
      // },
      // 统计
      {
        path: '/statistics',
        type: 'statistics',
        name: 'statistics',
        title: '统计',
        components: {
          content: ChildView,
          top: TopNav,
          aside: LeftNav
        },
        redirect: '/configView',
        menuShow: true,
        iconCls: 'icon-zhediexiaoguo',
        children: [
          {
            path: '/configView',
            components: {
              content: ChildView,
              top: TopNav,
              aside: LeftNav
            }
          }, {
            path: '/statistics/company',
            name: '综合数据统计',
            components: {
              content: ChildView,
              top: TopNav,
              aside: LeftNav
            },
            redirect: '/statisticscompany',
            // leaf: true,
            menuShow: true,
            iconCls: 'icon-zhediexiaoguo',
            meta: { title: '综合数据统计' },
            children: [
              {
                path: '/statisticscompany',
                name: '主体数据统计',
                components: {
                  content: companyStatistics,
                  top: TopNav,
                  aside: LeftNav
                },
                // leaf: false,
                menuShow: true,
                meta: { title: '主体属性分析' }
              },
              {
                path: '/statisticsproject',
                name: '项目数据统计',
                components: {
                  content: projectStatistics,
                  top: TopNav,
                  aside: LeftNav
                },
                // leaf: false,
                menuShow: true,
                meta: { title: '项目属性统计' }
              },
              {
                path: '/linkmanstatistics',
                name: '联系人数据分析',
                components: {
                  content: linkmanStatistics,
                  top: TopNav,
                  aside: LeftNav
                },
                // leaf: false,
                menuShow: true,
                meta: { title: '联系人属性分析' }
              },
              {
                path: '/businessstatistics',
                name: '业务数据统计',
                components: {
                  content: businessStatistics,
                  top: TopNav,
                  aside: LeftNav
                },
                // leaf: false,
                menuShow: true,
                meta: { title: '业务记录汇总' }
              },
              {
                path: '/taskrecordstatistics',
                name: '任务记录汇总',
                components: {
                  content: taskRecordStatistics,
                  top: TopNav,
                  aside: LeftNav
                },
                // leaf: false,
                menuShow: true,
                meta: { title: '任务记录汇总' }
              },
              {
                path: '/followuprecordstatistics',
                name: '跟进记录汇总',
                components: {
                  content: followUpRecordStatistics,
                  top: TopNav,
                  aside: LeftNav
                },
                // leaf: false,
                menuShow: true,
                meta: { title: '跟进记录汇总' }
              },
              {
                path: '/statisticscompany/statisticaldetails',
                name: '统计详情',
                components: {
                  content: statisticalDetails,
                  top: TopNav,
                  aside: LeftNav
                },
                // leaf: false,
                menuShow: false,
                meta: { title: '项目状态' }
              }
            ]
          }
        ]
      },
      // 公告
      {
        path: '/notice',
        type: 'notice',
        name: 'notice',
        title: '办公',
        components: {
          content: ChildView,
          top: TopNav,
          aside: LeftNav
        },
        redirect: '/configView',
        menuShow: true,
        iconCls: 'icon-zhediexiaoguo',
        children: [
          {
            path: '/configView',
            components: {
              content: ChildView,
              top: TopNav,
              aside: LeftNav
            }
          }, {
            path: '/noticeTable',
            name: '办公管理',
            components: {
              content: ChildView,
              top: TopNav,
              aside: LeftNav
            },
            // leaf: true,
            menuShow: true,
            iconCls: 'icon-zhediexiaoguo',
            meta: { title: '办公管理' },
            redirect: '/notice/list',
            children: [{
              path: '/notice/list',
              name: '系统公告',
              components: {
                content: Notice,
                top: TopNav,
                aside: LeftNav
              },
              // leaf: true,
              menuShow: true,
              // iconCls: 'icon-zhediexiaoguo',
              meta: { title: '系统公告' }
            },
            {
              path: '/follow',
              name: '跟进记录',
              components: {
                content: follow,
                top: TopNav,
                aside: LeftNav
              },
              // leaf: true,
              menuShow: true,
              // iconCls: 'icon-zhediexiaoguo',
              meta: { title: '跟进记录' }
            },
            {
              path: '/periodtask',
              name: '周期任务',
              components: {
                content: periodTask,
                top: TopNav,
                aside: LeftNav
              },
              // leaf: true,
              menuShow: true,
              // iconCls: 'icon-zhediexiaoguo',
              meta: { title: '周期任务' }
            },
            {
              path: '/withinmsg',
              name: '系统消息',
              components: {
                content: withinMsg,
                top: TopNav,
                aside: LeftNav
              },
              // leaf: true,
              menuShow: true,
              // iconCls: 'icon-zhediexiaoguo',
              meta: { title: '系统消息' }
            },
            {
              path: '/exportmanage',
              name: '导出管理',
              components: {
                content: exportManage,
                top: TopNav,
                aside: LeftNav
              },
              // leaf: true,
              menuShow: true,
              // iconCls: 'icon-zhediexiaoguo',
              meta: { title: '导出管理' }
            },
            {
              path: '/importmanage',
              name: '导入管理',
              components: {
                content: importManage,
                top: TopNav,
                aside: LeftNav
              },
              // leaf: true,
              menuShow: true,
              // iconCls: 'icon-zhediexiaoguo',
              meta: { title: '导入管理' }
            }]
          }]
      },
      // 管理
      {
        path: '/manage',
        type: 'manage',
        name: 'manage',
        title: '管理',
        components: {
          content: ChildView,
          top: TopNav,
          aside: LeftNav
        },
        redirect: '/configView',
        menuShow: true,
        iconCls: 'icon-zhediexiaoguo',
        children: [
          {
            path: '/configView',
            components: {
              content: ChildView,
              top: TopNav,
              aside: LeftNav
            }
          },
          {
            path: '/baseAdmin',
            name: '平台管理',
            components: {
              content: ChildView,
              top: TopNav,
              aside: LeftNav
            },
            // leaf: true,
            menuShow: true,
            iconCls: 'icon-zhediexiaoguo',
            meta: { title: '平台管理' },
            redirect: '/baseSetting',
            children: [{
              path: '/baseSetting',
              name: '基本设置',
              components: {
                content: BaseSetting,
                top: TopNav,
                aside: LeftNav
              },
              // leaf: true,
              menuShow: true,
              // iconCls: 'icon-zhediexiaoguo',
              meta: { title: '基本设置' }
            }, {
              path: '/dict/list',
              name: '字典管理',
              components: {
                content: Dict,
                top: TopNav,
                aside: LeftNav
              },
              // leaf: true,
              menuShow: true,
              // iconCls: 'icon-zhediexiaoguo',
              meta: { title: '字典管理' }
            }, {
              path: '/menuTree',
              name: '菜单管理',
              components: {
                content: Menu,
                top: TopNav,
                aside: LeftNav
              },
              // leaf: true,
              menuShow: true,
              // iconCls: 'icon-zhediexiaoguo',
              meta: { title: '菜单管理' }
            },
            {
              path: '/auth',
              name: '接口管理',
              components: {
                content: Auth,
                top: TopNav,
                aside: LeftNav
              },
              // leaf: true,
              menuShow: true,
              // iconCls: 'icon-zhediexiaoguo',
              meta: { title: '接口管理' }
            }]
          }, {
            path: '/roleTable',
            name: '用户管理',
            components: {
              content: ChildView,
              top: TopNav,
              aside: LeftNav
            },
            redirect: '/account',
            // leaf: true,
            menuShow: true,
            iconCls: 'icon-zhediexiaoguo',
            meta: { title: '用户管理' },
            children: [{
              path: '/account',
              name: '用户管理',
              components: {
                content: Account,
                top: TopNav,
                aside: LeftNav
              },
              // leaf: true,
              menuShow: true,
              // iconCls: 'icon-zhediexiaoguo',
              meta: { title: '用户管理' }
            }, {
              path: '/account/addAdmin',
              name: '添加用户',
              components: {
                content: UpdataUser,
                top: TopNav,
                aside: LeftNav
              },
              // leaf: true,
              menuShow: false,
              // iconCls: 'icon-zhediexiaoguo',
              meta: { title: '添加用户' }
            }, {
              path: '/account/detail',
              name: '用户详情',
              unAuthPage: {
                checkAllOperation: true,
                parentPath: '/account/detail'
              },
              components: {
                content: AccountDetail,
                top: TopNav,
                aside: LeftNav
              },
              // leaf: true,
              menuShow: false,
              // iconCls: 'icon-zhediexiaoguo',
              meta: { title: '用户详情' }
            }, {
              path: '/roleAdmin',
              name: '角色管理',
              components: {
                content: RoleTable,
                top: TopNav,
                aside: LeftNav
              },
              leaf: true,
              menuShow: true,
              meta: { title: '角色管理' }
            }, {
              path: '/roleAdmin/roleApi',
              name: '接口授权',
              components: {
                content: RoleApi,
                top: TopNav,
                aside: LeftNav
              },
              leaf: true,
              menuShow: false,
              meta: { title: '接口授权' }
            },
            {
              path: '/roleAdmin/admin',
              name: '关联账户',
              components: {
                content: RoleAdmin,
                top: TopNav,
                aside: LeftNav
              },
              leaf: true,
              menuShow: false,
              // iconCls: 'icon-zhediexiaoguo',
              meta: { title: '关联账户' }
            },
            {
              path: '/roleAdmin/roleView',
              name: '菜单授权',
              components: {
                content: RoleView,
                top: TopNav,
                aside: LeftNav
              },
              leaf: true,
              menuShow: false,
              iconCls: 'icon-zhediexiaoguo',
              meta: { title: '菜单授权' }
            }]
          }, {
            path: '/certificate',
            name: '证书资质',
            components: {
              content: ChildView,
              top: TopNav,
              aside: LeftNav
            },
            // leaf: true,
            menuShow: true,
            iconCls: 'icon-zhediexiaoguo',
            meta: { title: '证书资质' },
            redirect: '/certificate/list',
            children: [{
              path: '/certificate/list',
              name: '证书管理',
              components: {
                content: Certificate,
                top: TopNav,
                aside: LeftNav
              },
              // leaf: true,
              menuShow: true,
              meta: { title: '证书管理' }
            }, {
              path: '/qualification',
              name: '资质管理',
              components: {
                content: Qualification,
                top: TopNav,
                aside: LeftNav
              },
              leaf: true,
              menuShow: true,
              iconCls: 'icon-zhediexiaoguo',
              meta: { title: '资质管理' }
            }, {
              path: '/seal',
              name: '印章管理',
              components: {
                content: Seal,
                top: TopNav,
                aside: LeftNav
              },
              leaf: true,
              menuShow: true,
              iconCls: 'icon-zhediexiaoguo',
              meta: { title: '印章管理' }
            }, {
              path: '/certificatePack',
              name: '证书包管理',
              components: {
                content: CertificatePack,
                top: TopNav,
                aside: LeftNav
              },
              leaf: true,
              menuShow: true,
              iconCls: 'icon-zhediexiaoguo',
              meta: { title: '证书包管理' }
            }]
          }, {
            path: '/adminMoudle',
            name: '其他管理',
            components: {
              content: ChildView,
              top: TopNav,
              aside: LeftNav
            },
            // leaf: true,
            menuShow: true,
            iconCls: 'icon-zhediexiaoguo',
            redirect: '/adminMoudleTable',
            meta: { title: '其他管理' },
            children: [{
              path: '/adminMoudleTable',
              name: '审批流程设计',
              components: {
                content: AdminMoudle,
                top: TopNav,
                aside: LeftNav
              },
              // leaf: false,
              menuShow: true,
              meta: { title: '审批流程设计' }
            }, {
              path: '/adminMoudleTable/flow',
              name: '流程设计',
              components: {
                content: AdminFlow,
                top: TopNav,
                aside: LeftNav
              },
              // leaf: false,
              menuShow: false,
              meta: { title: '流程设计' }
            },
            {
              path: '/otherSetting',
              name: '第三方配置',
              components: {
                content: OtherSetting,
                top: TopNav,
                aside: LeftNav
              },
              // leaf: true,
              menuShow: true,
              iconCls: 'icon-zhediexiaoguo',
              meta: { title: '第三方配置' }
            },
            {
              path: '/deviceController',
              name: '设备管理',
              components: {
                content: deviceController,
                top: TopNav,
                aside: LeftNav
              },
              // leaf: true,
              menuShow: true,
              iconCls: 'icon-zhediexiaoguo',
              meta: { title: '设备管理' }
            },
            {
              path: '/patrolSetting',
              name: '巡检模块管理',
              components: {
                content: PatrolSetting,
                top: TopNav,
                aside: LeftNav
              },
              // leaf: true,
              menuShow: true,
              iconCls: 'icon-zhediexiaoguo',
              meta: { title: '巡检模块管理' }
            },
            {
              path: '/msgmanage',
              name: '消息管理',
              components: {
                content: msgManage,
                top: TopNav,
                aside: LeftNav
              },
              // leaf: true,
              menuShow: true,
              iconCls: 'icon-zhediexiaoguo',
              meta: { title: '消息管理' }
            },
            {
              path: '/scheduleJob',
              name: '计划任务',
              components: {
                content: ScheduleJob,
                top: TopNav,
                aside: LeftNav
              },
              // leaf: true,
              menuShow: true,
              iconCls: 'icon-zhediexiaoguo',
              meta: { title: '计划任务' }
            }
            ]
          }
        ]
      }
    ]
  }
]

export default businessRouter
